<template>
    <view class="w">
        <view class="item" v-for="v in list" :key="v.id" @click="fn(v)">
            <view class="p"> {{ v.title }}</view>
        </view>
    </view>
</template>

<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
const list = ref([])
onLoad(({ id, title }) => {
    uni.setNavigationBarTitle({
        title: String(title + id)
    });
    for (let i = 0; i < 10; i++) {
        list.value.push({
            id: i,
            imgUrl: '',
            title: title + '——' + i
        })
    }
})
const fn=({id,title})=>{
    uni.navigateTo({ url: `/pages/class/subject/videos/article/index?id=${id}&title=${title}` })
}
</script>

<style lang="scss" scoped>
.w {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.item {
    position: relative;
    width: 341rpx;
    height: 271rpx;
    margin-bottom: 18rpx;
    background-color: red;

    .p {
        position: absolute;
        bottom: 0;
        left: 0;
        z-index: 999;
        width: 100%;
        height: 53rpx;
        font-size: 21rpx;
        color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 0rpx 0rpx 0rpx 0rpx;
    }
}
</style>